home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 54455 / 54455.xpi / chrome / content / bup.txt < prev    next >
Extensible Markup Language  |  2009-12-31  |  3KB  |  67 lines

  1. <?xml version="1.0"?>
  2. <overlay id="passfinder" 
  3.          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  4.  
  5.  <statusbar id="status-bar">
  6.   <statusbarpanel onclick="gainh();">
  7.   <buttonid="shower" class="statusbarpanel-iconic" onclick="passfinder.passfinder();" src="chrome://passfinder/content/icon16.png" />
  8.   <button id="hider" class="statusbarpanel-iconic" onclick="passfinder.hidepassword();" src="chrome://passfinder/content/hide.png"  style="display:none;" />
  9.   </statusbarpanel>
  10. </statusbar>
  11.  <script type="application/x-javascript" src="chrome://passfinder/content/passfinder.js" />
  12.  
  13. </overlay>
  14.  
  15. function regL(){
  16. window.addEventListener("load", gainh, false);
  17. window.addEventListener("unload", uninit, false);     
  18. }
  19.  
  20. function init() {
  21.     //try{document.getElementById("appcontent").removeEventListener("DOMContentLoaded", passfinder.init(evnt), true);}catch(e){}
  22.     //if(gBrowser) gBrowser.addEventListener("onunload", passfinder.uninit(evnt), true);
  23.     
  24.     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
  25.     var mainWindow = wm.getMostRecentWindow("navigator:browser");
  26.     var allpfields = mainWindow.getBrowser().selectedBrowser.contentDocument.evaluate('//input[@type="password"]', mainWindow.getBrowser().selectedBrowser.contentDocument, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  27.  
  28.     if(allpfields.snapshotLength == 0) return;
  29.     for (var j = 0; j < allpfields.snapshotLength; j++){
  30.     allpfields.snapshotItem(j).addEventListener("click", gainh, false);
  31.     }
  32. }
  33.  
  34. function uninit() {
  35.     //var asd=evnt;
  36.     //try{if(gBrowser) gBrowser.removeEventListener("unload", passfinder.uninit(), true);}catch(e){}
  37.     var allpfields = e.originalTarget.evaluate('//input[@type="password"]', e.originalTarget, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  38.     if(allpfields.snapshotLength == 0) return;
  39.     for (var j = 0; j < allpfields.snapshotLength; j++){
  40.     allpfields.snapshotItem(j).removeEventListener("click", gainh , false);
  41.     }
  42. }
  43.  
  44. function tryEX() {
  45.     if(navigator.preference("extensions.passfinder.enabled")){
  46.                 evnt.target.type = "text"; 
  47.                 evnt.target.focus();
  48.                 if(navigator.preference("extensions.passfinder.cuscol")){
  49.                 evnt.target.style.color  = navigator.preference("extensions.passfinder.fgc");
  50.                 evnt.target.style.background  = navigator.preference("extensions.passfinder.bgc");
  51.                 }
  52.         }else{
  53.              //navigator.preference("extensions.passfinder.enabled", true); 
  54.              evnt.target.type = "password"; 
  55.              evnt.target.style.color  = "#000000";
  56.             evnt.target.style.background  = "#FFFFFF";
  57.              evnt.target.focus();
  58.         }
  59. }
  60.  
  61. function gainh() {
  62. if (navigator.preference("extensions.passfinder.enabled")){
  63. passfinder.hidepassword();
  64. }else{
  65. passfinder.passfinder();
  66. }
  67. regL();